<template>
  <div class="Panel">
    <header class="Panel-header">
      <slot name="header"></slot>
    </header>
    <main class="Panel-main">
      <slot></slot>
    </main>
    <footer class="Panel-footer">
      <slot name="footer"></slot>
    </footer>
  </div>
</template>

<script>
export default {
  name: 'Panel'
}
</script>

<style lang="scss">
@import '~@/assets/styles/variables.scss';
.Panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  overflow: hidden;
  .Panel-main {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-shrink: 1;
    margin-top: -1px;
    width: 100%;
    height: 100%;
    background-color: $backgroungColor;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .Panel-footer {
    position: relative;
    z-index: 5;
    .van-tabbar {
      position: relative;
      background: #fff;
    }
  }
}
</style>
